package cn.quevo.cube.provide.exception.response;

import cn.quevo.common.enums.EnumsInterface;

/**
 * 字段验证异常
 *
 * @author July july_sky@foxmail.com
 * @version 1.0
 * @date 2018/12/11 3:51 PM
 * @Copyright 湘豫（北京）科技有限公司版权所有.All Rights Reserved.
 */
public enum ColumnExceptionResponse implements EnumsInterface {
    SEQUENCE_EXCEPTION(4300, "序列参数缺失"),
    SEQUENCE_DATE_FORMAT_FAILD(4301, "序列格式化错误"),
    MAX_LENGTH_LT_MIN_LENGTH(4302, "最大长度不能小于最小长度"),
    MAX_VALUE_LT_MIN_VALUE(4303, "最大值不能小于最小值"),
    OPTION_VALUE_EMPTY(4304, "选项值不能为空"),
    DATE_FORMATER_FAILD(4305, "日期格式错误"),
    TIME_FORMATER_FAILD(4306, "时间格式错误"),
    LENGTH_NOT_RANGE(4307, "字符长度超出定义范围"),
    VALUE_NOT_RANGE(4308, "取值超出定义范围"),
    SEQUENCE_GET_FAILD(4309, "序列获取失败"),
    REQUIRED_EMPTY(4310, "必填项不能为空"),
    DATA_FORMAT_FAILD(4311, "数据格式错误"),
    OPTION_NOT_EXISTS(4312, "选项值不存在"),
    LOT_OF_UNDEFINED_VARIABLE(4313, "大量未定义参数"),
    FILE_SIZE(4314, "文件大小不能为空"),
    FILE_TYPE(4315, "支持的文件类型不能为空"),
    FILE_TYPE_FAILD(4016, "不支持的文件类型"),
    MIN_VALUE_LT_ZERO(4017,"最小值不能小于0");

    private Integer code;
    private String value;

    ColumnExceptionResponse(Integer code, String value) {
        this.code = code;
        this.value = value;
    }

    @Override
    public Integer getCode() {
        return this.code;
    }

    @Override
    public String getValue() {
        return this.value;
    }
}
